package com.flyme.module.base.provider.service.impl;

import com.flyme.core.base.supper.service.impl.BaseServiceImpl;
import com.flyme.module.base.client.entity.SysAdvertising;
import com.flyme.module.base.client.entity.SysWorkCourse;
import com.flyme.module.base.client.enums.WorkingYearEnum;
import com.flyme.module.base.provider.mapper.SysAdvertisingMapper;
import com.flyme.module.base.provider.mapper.SysWorkCourseMapper;
import com.flyme.module.base.provider.service.SysAdvertisingService;
import com.flyme.module.base.provider.service.SysWorkCourseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author: zyf
 * @date: 2018/10/24 16:33
 * @description:
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SysAdvertisingServiceImpl extends BaseServiceImpl<SysAdvertisingMapper, SysAdvertising> implements SysAdvertisingService {

    /**
     * 查询所有广告
     */
    public List<SysAdvertising> selectAll(){
        return list(q().eq("isShow", 1).orderByAsc("sortOrder"));
    }

}
